//
//  YPLoginCore.swift
//  YPSwift
//  模块核心
//  Created by ogawa on 2020/4/28.
//  Copyright © 2020 ogawa. All rights reserved.
//

import Foundation

/// 本模块的名称， 本模块的storyboard 名称必须 与模块名称相同 ,已经用于静态资源的加载回用到
let YPLoginCore_modularName = "YPLoginM"

public  class  YPLoginCore {
    
    public static var sharedInstance :  YPLoginCore {
        struct Static {
            static let instance :  YPLoginCore =  YPLoginCore()
        }
        return Static.instance
    }
    
    /// 登陆模块的storyboard
    public static var storyboard:UIStoryboard {
        get{
            return UIStoryboard(name: YPLoginCore_modularName, bundle:  YPLoginCore.bundle)
        }
    }
    
    ///供其他模块使用
    public static var bundle:Bundle?{
        get{
            guard let bundleURL = Bundle(for:self).url(forResource: YPLoginCore_modularName, withExtension: "bundle") else {
                return nil
            }
            guard let bundle = Bundle(url: bundleURL) else {
                return nil
            }
            return bundle
        }
    }
    
}

